package br.unifor.g2cl.hl.listener;

import br.unifor.g2cl.G2CLMessage;
import br.unifor.g2cl.hl.MessageDispatcher;

/**
 * 
 * Interface that should be implemented by a class that wants to to handle
 * requests received by a {@link MessageDispatcher},  
 * 
 * 
 * @author Leandro Sales (leandro.shp@gmail.com)
 *
 */
public interface MessageDispatcherListener {
	
	/**
	 * 
	 * Handles a specific request.
	 * 
	 * @param message - message send by a member 
	 * @return - response to this specific request. Should be serializable.
	 */
	public Object handle(G2CLMessage message); 
}
